package org.example.platform.elasticsearch.enumDto;


import lombok.AllArgsConstructor;
import lombok.Getter;

@Getter
@AllArgsConstructor
public enum HotelEnum {
    MUSTNOT("must_not","MUSTNOT"),
    SHOULD("should","SHOULD"),
    MUST("must","MUST"),
    EXIST("exist","EXIST"),
    RANGE("range","RANGE"),
    TERMS("terms","TERMS"),
    ;

    private String code;
    private String msg;



    public static HotelEnum queryCode(String code) {
        for (HotelEnum it : HotelEnum.values()) {
            if (it.getCode().equals(code)) {
                return it;
            }
        }
        return null;
    }
}
